//
//  BaseTableView.m
//  YiCuiMiaoZhang
//
//  Created by Sings on 2019/2/28.
//  Copyright © 2018 益萃网络科技（中国）有限公司. All rights reserved.
//

#import "BaseTableView.h"

@implementation BaseTableView

//+ (instancetype) allocWithZone:(struct _NSZone *)zone {
//    BaseTableView *baseTableView = [super allocWithZone:zone];
//    [baseTableView bindViewModel];
//    return baseTableView;
//}

//- (void) bindViewModel {
//    @weakify(self);
//    [[[RACObserve(self, dataSouce) distinctUntilChanged] deliverOnMainThread] subscribeNext:^(id
//    x) {
//        @strongify(self);
//        [self reloadData];
//    }];
//}

- (void)touchesEnded:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
    [super touchesEnded:touches withEvent:event];
    if (touches.count == 1) {
        NSArray<UITouch *> *arr    = [touches allObjects];
        NSMutableArray *forWarding = [arr[0] valueForKey:@"forwardingRecord"];
        if (forWarding == nil || forWarding.count == 0) {
            if ([self.baseTableViewDelegate respondsToSelector:@selector(baseTableViewTouches:)]) {
                [self.baseTableViewDelegate baseTableViewTouches:self];
            }
        }
    }
}

@end
